import re 
ext4fs_stats= re.compile(r'Created filesystem with ([0-9]+)/([0-9]+)blocks') 
line= 'Created filesystem with 123/456 blocks'
m= re.match(ext4fs_stats,line)
print(m.group())